﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MouseButtonEventSender : MonoBehaviour
{
    // private bool mouseRightButtonDown = false;
    public void Update()
    {
        // if (mouseRightButtonDown != Input.GetMouseButton(1)) {
        //     mouseRightButtonDown = !mouseRightButtonDown;
        //     if (mouseRightButtonDown) {
        //         EventManager.SendMouseButtonDownEvent(1);
        //     }
        // }
        // for (int keyIndex = 0; keyIndex < 3; ++keyIndex)
        // {
        //     if (Input.GetMouseButton(keyIndex))
        //     {
        //         EventManager.SendMouseButtonDownEvent(keyIndex);
        //         break;
        //     }
        // }
    }

    public void OnMouseDown()
    {
        for (int keyIndex = 0; keyIndex < 3; ++keyIndex)
        {
            if (Input.GetMouseButton(keyIndex))
            {
                EventManager.SendMouseButtonDownEvent(keyIndex);
                break;
            }
        }
    }

    // public void OnMouseUp()
    // {
    // }
}
